<!-- 数字 -->
<template>
 <div class='statistic'>
    <view class="currency" v-if="currency!=='KZT'">{{ currencyType[currency||'KZT'].value }}</view>
    <u-count-to :endVal="value" :separator="separator" :duration="1" :decimals="decimals"></u-count-to>
    <view class="currency" v-if="currency==='KZT'">{{ currencyType[currency||'KZT'].value }}</view>
 </div>
</template>

<script>
export default {
  props:{
    separator:{
      type:String,
      default:','
    },
    decimals:{
      type:Number,
      default:2
    },
    value:{
      type:[String,Number],
      default:0
    },
    currency:{
      type:String,
      default:''
    },
    valueStyle:{
      type:Object,
      default:()=>{}
    }
  },
  data() {
    return {
      currencyType:{
        CNY:{
          label:'人民币',
          value:'￥'
        },
        RUB:{
          label:'卢布',
          value:'₽'
        },
        USD:{
          label:'美元',
          value:'$'
        },
        KZT:{
          label:'坚戈',
          value:'₸'
        },
      }
    }
  },
  mounted(){
  }
}
</script>
<style lang='scss' scoped>
.statistic{
    display: inline-flex;
	align-items: center;
}
.u-count-num{
    color: inherit !important;
    font-size:inherit !important;
    font-weight: inherit !important;
}
.currency{
	transform:scale(0.8);
}
</style>
